/*
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/
$(document).ready(function() {

    $(".click-title").mouseenter( function(    e){
        e.preventDefault();
        this.style.cursor="pointer";
    });
    $(".click-title").mousedown( function(event){
        event.preventDefault();
    });

    // Ugly code while this script is shared among several pages
    try{
        refreshHitsPerSecond(true);
    } catch(e){}
    try{
        refreshResponseTimeOverTime(true);
    } catch(e){}
    try{
        refreshResponseTimePercentiles();
    } catch(e){}
});


var responseTimePercentilesInfos = {
        data: {"result": {"minY": 986.0, "minX": 0.0, "maxY": 2379.0, "series": [{"data": [[0.0, 986.0], [0.1, 988.0], [0.2, 1022.0], [0.3, 1022.0], [0.4, 1028.0], [0.5, 1030.0], [0.6, 1031.0], [0.7, 1031.0], [0.8, 1033.0], [0.9, 1035.0], [1.0, 1036.0], [1.1, 1036.0], [1.2, 1039.0], [1.3, 1042.0], [1.4, 1042.0], [1.5, 1045.0], [1.6, 1047.0], [1.7, 1081.0], [1.8, 1082.0], [1.9, 1084.0], [2.0, 1091.0], [2.1, 1092.0], [2.2, 1093.0], [2.3, 1093.0], [2.4, 1096.0], [2.5, 1099.0], [2.6, 1100.0], [2.7, 1101.0], [2.8, 1102.0], [2.9, 1102.0], [3.0, 1102.0], [3.1, 1104.0], [3.2, 1105.0], [3.3, 1107.0], [3.4, 1107.0], [3.5, 1110.0], [3.6, 1110.0], [3.7, 1111.0], [3.8, 1111.0], [3.9, 1111.0], [4.0, 1112.0], [4.1, 1112.0], [4.2, 1113.0], [4.3, 1113.0], [4.4, 1116.0], [4.5, 1117.0], [4.6, 1118.0], [4.7, 1118.0], [4.8, 1119.0], [4.9, 1120.0], [5.0, 1120.0], [5.1, 1121.0], [5.2, 1122.0], [5.3, 1122.0], [5.4, 1122.0], [5.5, 1122.0], [5.6, 1123.0], [5.7, 1123.0], [5.8, 1124.0], [5.9, 1126.0], [6.0, 1126.0], [6.1, 1126.0], [6.2, 1127.0], [6.3, 1128.0], [6.4, 1129.0], [6.5, 1129.0], [6.6, 1131.0], [6.7, 1133.0], [6.8, 1133.0], [6.9, 1134.0], [7.0, 1135.0], [7.1, 1137.0], [7.2, 1139.0], [7.3, 1140.0], [7.4, 1141.0], [7.5, 1141.0], [7.6, 1142.0], [7.7, 1143.0], [7.8, 1143.0], [7.9, 1144.0], [8.0, 1144.0], [8.1, 1146.0], [8.2, 1146.0], [8.3, 1146.0], [8.4, 1146.0], [8.5, 1148.0], [8.6, 1148.0], [8.7, 1150.0], [8.8, 1151.0], [8.9, 1154.0], [9.0, 1201.0], [9.1, 1201.0], [9.2, 1204.0], [9.3, 1214.0], [9.4, 1219.0], [9.5, 1226.0], [9.6, 1229.0], [9.7, 1234.0], [9.8, 1243.0], [9.9, 1255.0], [10.0, 1262.0], [10.1, 1271.0], [10.2, 1290.0], [10.3, 1292.0], [10.4, 1297.0], [10.5, 1302.0], [10.6, 1303.0], [10.7, 1303.0], [10.8, 1304.0], [10.9, 1304.0], [11.0, 1304.0], [11.1, 1304.0], [11.2, 1305.0], [11.3, 1305.0], [11.4, 1305.0], [11.5, 1305.0], [11.6, 1306.0], [11.7, 1306.0], [11.8, 1306.0], [11.9, 1306.0], [12.0, 1306.0], [12.1, 1306.0], [12.2, 1306.0], [12.3, 1307.0], [12.4, 1307.0], [12.5, 1307.0], [12.6, 1310.0], [12.7, 1324.0], [12.8, 1330.0], [12.9, 1331.0], [13.0, 1331.0], [13.1, 1331.0], [13.2, 1332.0], [13.3, 1332.0], [13.4, 1332.0], [13.5, 1332.0], [13.6, 1332.0], [13.7, 1333.0], [13.8, 1334.0], [13.9, 1340.0], [14.0, 1348.0], [14.1, 1353.0], [14.2, 1373.0], [14.3, 1384.0], [14.4, 1385.0], [14.5, 1389.0], [14.6, 1391.0], [14.7, 1393.0], [14.8, 1395.0], [14.9, 1397.0], [15.0, 1399.0], [15.1, 1400.0], [15.2, 1401.0], [15.3, 1404.0], [15.4, 1404.0], [15.5, 1408.0], [15.6, 1411.0], [15.7, 1413.0], [15.8, 1414.0], [15.9, 1418.0], [16.0, 1422.0], [16.1, 1427.0], [16.2, 1428.0], [16.3, 1433.0], [16.4, 1438.0], [16.5, 1446.0], [16.6, 1456.0], [16.7, 1461.0], [16.8, 1462.0], [16.9, 1469.0], [17.0, 1473.0], [17.1, 1474.0], [17.2, 1474.0], [17.3, 1477.0], [17.4, 1479.0], [17.5, 1486.0], [17.6, 1487.0], [17.7, 1487.0], [17.8, 1489.0], [17.9, 1492.0], [18.0, 1492.0], [18.1, 1495.0], [18.2, 1495.0], [18.3, 1496.0], [18.4, 1498.0], [18.5, 1499.0], [18.6, 1499.0], [18.7, 1502.0], [18.8, 1503.0], [18.9, 1503.0], [19.0, 1504.0], [19.1, 1505.0], [19.2, 1505.0], [19.3, 1507.0], [19.4, 1507.0], [19.5, 1508.0], [19.6, 1508.0], [19.7, 1510.0], [19.8, 1515.0], [19.9, 1515.0], [20.0, 1516.0], [20.1, 1517.0], [20.2, 1517.0], [20.3, 1520.0], [20.4, 1521.0], [20.5, 1522.0], [20.6, 1522.0], [20.7, 1522.0], [20.8, 1523.0], [20.9, 1524.0], [21.0, 1524.0], [21.1, 1524.0], [21.2, 1525.0], [21.3, 1526.0], [21.4, 1528.0], [21.5, 1529.0], [21.6, 1531.0], [21.7, 1532.0], [21.8, 1532.0], [21.9, 1532.0], [22.0, 1532.0], [22.1, 1532.0], [22.2, 1533.0], [22.3, 1533.0], [22.4, 1536.0], [22.5, 1536.0], [22.6, 1537.0], [22.7, 1538.0], [22.8, 1539.0], [22.9, 1539.0], [23.0, 1540.0], [23.1, 1541.0], [23.2, 1541.0], [23.3, 1542.0], [23.4, 1542.0], [23.5, 1543.0], [23.6, 1544.0], [23.7, 1544.0], [23.8, 1546.0], [23.9, 1546.0], [24.0, 1546.0], [24.1, 1548.0], [24.2, 1549.0], [24.3, 1551.0], [24.4, 1551.0], [24.5, 1551.0], [24.6, 1551.0], [24.7, 1552.0], [24.8, 1554.0], [24.9, 1554.0], [25.0, 1555.0], [25.1, 1555.0], [25.2, 1558.0], [25.3, 1558.0], [25.4, 1559.0], [25.5, 1559.0], [25.6, 1559.0], [25.7, 1560.0], [25.8, 1560.0], [25.9, 1561.0], [26.0, 1561.0], [26.1, 1561.0], [26.2, 1562.0], [26.3, 1562.0], [26.4, 1563.0], [26.5, 1564.0], [26.6, 1564.0], [26.7, 1564.0], [26.8, 1564.0], [26.9, 1565.0], [27.0, 1565.0], [27.1, 1565.0], [27.2, 1565.0], [27.3, 1566.0], [27.4, 1566.0], [27.5, 1566.0], [27.6, 1567.0], [27.7, 1567.0], [27.8, 1567.0], [27.9, 1570.0], [28.0, 1572.0], [28.1, 1572.0], [28.2, 1573.0], [28.3, 1574.0], [28.4, 1575.0], [28.5, 1576.0], [28.6, 1576.0], [28.7, 1577.0], [28.8, 1577.0], [28.9, 1577.0], [29.0, 1577.0], [29.1, 1577.0], [29.2, 1577.0], [29.3, 1579.0], [29.4, 1580.0], [29.5, 1582.0], [29.6, 1583.0], [29.7, 1584.0], [29.8, 1587.0], [29.9, 1588.0], [30.0, 1589.0], [30.1, 1589.0], [30.2, 1592.0], [30.3, 1593.0], [30.4, 1594.0], [30.5, 1595.0], [30.6, 1597.0], [30.7, 1599.0], [30.8, 1600.0], [30.9, 1601.0], [31.0, 1602.0], [31.1, 1602.0], [31.2, 1606.0], [31.3, 1607.0], [31.4, 1608.0], [31.5, 1609.0], [31.6, 1611.0], [31.7, 1612.0], [31.8, 1613.0], [31.9, 1614.0], [32.0, 1615.0], [32.1, 1615.0], [32.2, 1615.0], [32.3, 1616.0], [32.4, 1617.0], [32.5, 1617.0], [32.6, 1619.0], [32.7, 1619.0], [32.8, 1620.0], [32.9, 1621.0], [33.0, 1621.0], [33.1, 1621.0], [33.2, 1621.0], [33.3, 1623.0], [33.4, 1624.0], [33.5, 1624.0], [33.6, 1625.0], [33.7, 1626.0], [33.8, 1627.0], [33.9, 1627.0], [34.0, 1628.0], [34.1, 1629.0], [34.2, 1631.0], [34.3, 1634.0], [34.4, 1635.0], [34.5, 1635.0], [34.6, 1637.0], [34.7, 1640.0], [34.8, 1641.0], [34.9, 1644.0], [35.0, 1648.0], [35.1, 1649.0], [35.2, 1650.0], [35.3, 1651.0], [35.4, 1654.0], [35.5, 1656.0], [35.6, 1658.0], [35.7, 1658.0], [35.8, 1661.0], [35.9, 1663.0], [36.0, 1663.0], [36.1, 1664.0], [36.2, 1664.0], [36.3, 1665.0], [36.4, 1666.0], [36.5, 1666.0], [36.6, 1668.0], [36.7, 1668.0], [36.8, 1670.0], [36.9, 1671.0], [37.0, 1671.0], [37.1, 1673.0], [37.2, 1673.0], [37.3, 1674.0], [37.4, 1674.0], [37.5, 1677.0], [37.6, 1678.0], [37.7, 1679.0], [37.8, 1680.0], [37.9, 1681.0], [38.0, 1682.0], [38.1, 1683.0], [38.2, 1684.0], [38.3, 1684.0], [38.4, 1686.0], [38.5, 1686.0], [38.6, 1686.0], [38.7, 1687.0], [38.8, 1689.0], [38.9, 1689.0], [39.0, 1690.0], [39.1, 1690.0], [39.2, 1690.0], [39.3, 1690.0], [39.4, 1691.0], [39.5, 1691.0], [39.6, 1693.0], [39.7, 1693.0], [39.8, 1694.0], [39.9, 1694.0], [40.0, 1695.0], [40.1, 1696.0], [40.2, 1697.0], [40.3, 1698.0], [40.4, 1698.0], [40.5, 1698.0], [40.6, 1698.0], [40.7, 1699.0], [40.8, 1701.0], [40.9, 1703.0], [41.0, 1706.0], [41.1, 1706.0], [41.2, 1707.0], [41.3, 1707.0], [41.4, 1709.0], [41.5, 1709.0], [41.6, 1711.0], [41.7, 1712.0], [41.8, 1712.0], [41.9, 1716.0], [42.0, 1716.0], [42.1, 1718.0], [42.2, 1718.0], [42.3, 1719.0], [42.4, 1720.0], [42.5, 1721.0], [42.6, 1722.0], [42.7, 1722.0], [42.8, 1722.0], [42.9, 1723.0], [43.0, 1723.0], [43.1, 1725.0], [43.2, 1729.0], [43.3, 1734.0], [43.4, 1735.0], [43.5, 1735.0], [43.6, 1738.0], [43.7, 1740.0], [43.8, 1740.0], [43.9, 1740.0], [44.0, 1745.0], [44.1, 1745.0], [44.2, 1746.0], [44.3, 1750.0], [44.4, 1752.0], [44.5, 1753.0], [44.6, 1754.0], [44.7, 1754.0], [44.8, 1755.0], [44.9, 1760.0], [45.0, 1765.0], [45.1, 1766.0], [45.2, 1766.0], [45.3, 1768.0], [45.4, 1768.0], [45.5, 1769.0], [45.6, 1769.0], [45.7, 1770.0], [45.8, 1770.0], [45.9, 1770.0], [46.0, 1771.0], [46.1, 1771.0], [46.2, 1771.0], [46.3, 1771.0], [46.4, 1772.0], [46.5, 1773.0], [46.6, 1773.0], [46.7, 1774.0], [46.8, 1774.0], [46.9, 1775.0], [47.0, 1776.0], [47.1, 1776.0], [47.2, 1777.0], [47.3, 1778.0], [47.4, 1779.0], [47.5, 1779.0], [47.6, 1779.0], [47.7, 1779.0], [47.8, 1779.0], [47.9, 1779.0], [48.0, 1779.0], [48.1, 1779.0], [48.2, 1779.0], [48.3, 1780.0], [48.4, 1781.0], [48.5, 1781.0], [48.6, 1782.0], [48.7, 1782.0], [48.8, 1782.0], [48.9, 1783.0], [49.0, 1784.0], [49.1, 1785.0], [49.2, 1785.0], [49.3, 1786.0], [49.4, 1786.0], [49.5, 1787.0], [49.6, 1788.0], [49.7, 1791.0], [49.8, 1792.0], [49.9, 1792.0], [50.0, 1796.0], [50.1, 1796.0], [50.2, 1798.0], [50.3, 1798.0], [50.4, 1800.0], [50.5, 1802.0], [50.6, 1803.0], [50.7, 1806.0], [50.8, 1806.0], [50.9, 1807.0], [51.0, 1811.0], [51.1, 1811.0], [51.2, 1811.0], [51.3, 1814.0], [51.4, 1816.0], [51.5, 1816.0], [51.6, 1818.0], [51.7, 1819.0], [51.8, 1821.0], [51.9, 1823.0], [52.0, 1823.0], [52.1, 1824.0], [52.2, 1824.0], [52.3, 1827.0], [52.4, 1827.0], [52.5, 1829.0], [52.6, 1831.0], [52.7, 1831.0], [52.8, 1831.0], [52.9, 1831.0], [53.0, 1832.0], [53.1, 1833.0], [53.2, 1834.0], [53.3, 1835.0], [53.4, 1838.0], [53.5, 1840.0], [53.6, 1841.0], [53.7, 1841.0], [53.8, 1842.0], [53.9, 1844.0], [54.0, 1846.0], [54.1, 1847.0], [54.2, 1853.0], [54.3, 1855.0], [54.4, 1856.0], [54.5, 1860.0], [54.6, 1861.0], [54.7, 1862.0], [54.8, 1865.0], [54.9, 1865.0], [55.0, 1866.0], [55.1, 1866.0], [55.2, 1866.0], [55.3, 1866.0], [55.4, 1866.0], [55.5, 1866.0], [55.6, 1866.0], [55.7, 1867.0], [55.8, 1868.0], [55.9, 1869.0], [56.0, 1869.0], [56.1, 1871.0], [56.2, 1871.0], [56.3, 1872.0], [56.4, 1872.0], [56.5, 1872.0], [56.6, 1872.0], [56.7, 1872.0], [56.8, 1873.0], [56.9, 1873.0], [57.0, 1874.0], [57.1, 1874.0], [57.2, 1875.0], [57.3, 1875.0], [57.4, 1877.0], [57.5, 1877.0], [57.6, 1877.0], [57.7, 1877.0], [57.8, 1877.0], [57.9, 1879.0], [58.0, 1880.0], [58.1, 1881.0], [58.2, 1882.0], [58.3, 1882.0], [58.4, 1883.0], [58.5, 1884.0], [58.6, 1885.0], [58.7, 1886.0], [58.8, 1887.0], [58.9, 1888.0], [59.0, 1891.0], [59.1, 1892.0], [59.2, 1898.0], [59.3, 1902.0], [59.4, 1905.0], [59.5, 1906.0], [59.6, 1908.0], [59.7, 1916.0], [59.8, 1921.0], [59.9, 1931.0], [60.0, 1932.0], [60.1, 1939.0], [60.2, 1944.0], [60.3, 1945.0], [60.4, 1945.0], [60.5, 1948.0], [60.6, 1965.0], [60.7, 1968.0], [60.8, 1971.0], [60.9, 1971.0], [61.0, 1973.0], [61.1, 1975.0], [61.2, 1977.0], [61.3, 1978.0], [61.4, 1978.0], [61.5, 1978.0], [61.6, 1978.0], [61.7, 1982.0], [61.8, 1986.0], [61.9, 1986.0], [62.0, 1987.0], [62.1, 1988.0], [62.2, 1989.0], [62.3, 1993.0], [62.4, 1994.0], [62.5, 1997.0], [62.6, 1998.0], [62.7, 1999.0], [62.8, 1999.0], [62.9, 2000.0], [63.0, 2001.0], [63.1, 2001.0], [63.2, 2001.0], [63.3, 2003.0], [63.4, 2003.0], [63.5, 2003.0], [63.6, 2006.0], [63.7, 2008.0], [63.8, 2008.0], [63.9, 2009.0], [64.0, 2010.0], [64.1, 2011.0], [64.2, 2011.0], [64.3, 2012.0], [64.4, 2012.0], [64.5, 2013.0], [64.6, 2014.0], [64.7, 2014.0], [64.8, 2015.0], [64.9, 2015.0], [65.0, 2016.0], [65.1, 2016.0], [65.2, 2018.0], [65.3, 2018.0], [65.4, 2020.0], [65.5, 2022.0], [65.6, 2022.0], [65.7, 2022.0], [65.8, 2023.0], [65.9, 2023.0], [66.0, 2023.0], [66.1, 2023.0], [66.2, 2025.0], [66.3, 2025.0], [66.4, 2027.0], [66.5, 2027.0], [66.6, 2028.0], [66.7, 2028.0], [66.8, 2029.0], [66.9, 2029.0], [67.0, 2030.0], [67.1, 2030.0], [67.2, 2031.0], [67.3, 2031.0], [67.4, 2031.0], [67.5, 2032.0], [67.6, 2032.0], [67.7, 2033.0], [67.8, 2034.0], [67.9, 2034.0], [68.0, 2034.0], [68.1, 2035.0], [68.2, 2036.0], [68.3, 2036.0], [68.4, 2037.0], [68.5, 2037.0], [68.6, 2038.0], [68.7, 2038.0], [68.8, 2039.0], [68.9, 2039.0], [69.0, 2039.0], [69.1, 2039.0], [69.2, 2039.0], [69.3, 2039.0], [69.4, 2040.0], [69.5, 2040.0], [69.6, 2040.0], [69.7, 2040.0], [69.8, 2040.0], [69.9, 2040.0], [70.0, 2040.0], [70.1, 2041.0], [70.2, 2041.0], [70.3, 2041.0], [70.4, 2041.0], [70.5, 2042.0], [70.6, 2042.0], [70.7, 2042.0], [70.8, 2043.0], [70.9, 2043.0], [71.0, 2043.0], [71.1, 2043.0], [71.2, 2044.0], [71.3, 2044.0], [71.4, 2044.0], [71.5, 2044.0], [71.6, 2045.0], [71.7, 2048.0], [71.8, 2049.0], [71.9, 2050.0], [72.0, 2050.0], [72.1, 2051.0], [72.2, 2052.0], [72.3, 2052.0], [72.4, 2054.0], [72.5, 2056.0], [72.6, 2056.0], [72.7, 2057.0], [72.8, 2057.0], [72.9, 2057.0], [73.0, 2058.0], [73.1, 2058.0], [73.2, 2058.0], [73.3, 2058.0], [73.4, 2058.0], [73.5, 2058.0], [73.6, 2058.0], [73.7, 2058.0], [73.8, 2058.0], [73.9, 2058.0], [74.0, 2058.0], [74.1, 2059.0], [74.2, 2059.0], [74.3, 2059.0], [74.4, 2059.0], [74.5, 2059.0], [74.6, 2059.0], [74.7, 2059.0], [74.8, 2059.0], [74.9, 2060.0], [75.0, 2060.0], [75.1, 2060.0], [75.2, 2060.0], [75.3, 2060.0], [75.4, 2060.0], [75.5, 2060.0], [75.6, 2061.0], [75.7, 2061.0], [75.8, 2061.0], [75.9, 2061.0], [76.0, 2061.0], [76.1, 2062.0], [76.2, 2062.0], [76.3, 2062.0], [76.4, 2062.0], [76.5, 2062.0], [76.6, 2062.0], [76.7, 2062.0], [76.8, 2062.0], [76.9, 2062.0], [77.0, 2063.0], [77.1, 2063.0], [77.2, 2063.0], [77.3, 2063.0], [77.4, 2063.0], [77.5, 2063.0], [77.6, 2064.0], [77.7, 2064.0], [77.8, 2064.0], [77.9, 2064.0], [78.0, 2064.0], [78.1, 2064.0], [78.2, 2064.0], [78.3, 2064.0], [78.4, 2064.0], [78.5, 2064.0], [78.6, 2064.0], [78.7, 2065.0], [78.8, 2065.0], [78.9, 2065.0], [79.0, 2065.0], [79.1, 2065.0], [79.2, 2066.0], [79.3, 2066.0], [79.4, 2066.0], [79.5, 2066.0], [79.6, 2067.0], [79.7, 2067.0], [79.8, 2068.0], [79.9, 2068.0], [80.0, 2068.0], [80.1, 2068.0], [80.2, 2069.0], [80.3, 2069.0], [80.4, 2069.0], [80.5, 2069.0], [80.6, 2070.0], [80.7, 2070.0], [80.8, 2070.0], [80.9, 2072.0], [81.0, 2075.0], [81.1, 2075.0], [81.2, 2075.0], [81.3, 2075.0], [81.4, 2076.0], [81.5, 2076.0], [81.6, 2076.0], [81.7, 2076.0], [81.8, 2078.0], [81.9, 2079.0], [82.0, 2081.0], [82.1, 2082.0], [82.2, 2082.0], [82.3, 2082.0], [82.4, 2082.0], [82.5, 2082.0], [82.6, 2082.0], [82.7, 2083.0], [82.8, 2083.0], [82.9, 2083.0], [83.0, 2086.0], [83.1, 2086.0], [83.2, 2086.0], [83.3, 2087.0], [83.4, 2087.0], [83.5, 2087.0], [83.6, 2087.0], [83.7, 2088.0], [83.8, 2088.0], [83.9, 2088.0], [84.0, 2088.0], [84.1, 2088.0], [84.2, 2088.0], [84.3, 2089.0], [84.4, 2090.0], [84.5, 2090.0], [84.6, 2090.0], [84.7, 2092.0], [84.8, 2092.0], [84.9, 2093.0], [85.0, 2094.0], [85.1, 2094.0], [85.2, 2094.0], [85.3, 2095.0], [85.4, 2096.0], [85.5, 2096.0], [85.6, 2096.0], [85.7, 2096.0], [85.8, 2096.0], [85.9, 2097.0], [86.0, 2097.0], [86.1, 2097.0], [86.2, 2098.0], [86.3, 2098.0], [86.4, 2098.0], [86.5, 2098.0], [86.6, 2099.0], [86.7, 2099.0], [86.8, 2099.0], [86.9, 2100.0], [87.0, 2101.0], [87.1, 2101.0], [87.2, 2102.0], [87.3, 2102.0], [87.4, 2102.0], [87.5, 2102.0], [87.6, 2102.0], [87.7, 2102.0], [87.8, 2103.0], [87.9, 2103.0], [88.0, 2103.0], [88.1, 2104.0], [88.2, 2105.0], [88.3, 2106.0], [88.4, 2106.0], [88.5, 2109.0], [88.6, 2110.0], [88.7, 2110.0], [88.8, 2111.0], [88.9, 2112.0], [89.0, 2113.0], [89.1, 2114.0], [89.2, 2114.0], [89.3, 2114.0], [89.4, 2114.0], [89.5, 2115.0], [89.6, 2115.0], [89.7, 2115.0], [89.8, 2115.0], [89.9, 2116.0], [90.0, 2116.0], [90.1, 2117.0], [90.2, 2117.0], [90.3, 2117.0], [90.4, 2117.0], [90.5, 2118.0], [90.6, 2118.0], [90.7, 2118.0], [90.8, 2118.0], [90.9, 2118.0], [91.0, 2118.0], [91.1, 2118.0], [91.2, 2118.0], [91.3, 2118.0], [91.4, 2118.0], [91.5, 2118.0], [91.6, 2118.0], [91.7, 2119.0], [91.8, 2119.0], [91.9, 2119.0], [92.0, 2119.0], [92.1, 2119.0], [92.2, 2119.0], [92.3, 2119.0], [92.4, 2120.0], [92.5, 2120.0], [92.6, 2121.0], [92.7, 2122.0], [92.8, 2122.0], [92.9, 2123.0], [93.0, 2123.0], [93.1, 2125.0], [93.2, 2125.0], [93.3, 2127.0], [93.4, 2127.0], [93.5, 2127.0], [93.6, 2129.0], [93.7, 2130.0], [93.8, 2130.0], [93.9, 2130.0], [94.0, 2130.0], [94.1, 2132.0], [94.2, 2132.0], [94.3, 2133.0], [94.4, 2133.0], [94.5, 2133.0], [94.6, 2133.0], [94.7, 2134.0], [94.8, 2135.0], [94.9, 2136.0], [95.0, 2136.0], [95.1, 2137.0], [95.2, 2138.0], [95.3, 2139.0], [95.4, 2139.0], [95.5, 2141.0], [95.6, 2142.0], [95.7, 2143.0], [95.8, 2143.0], [95.9, 2144.0], [96.0, 2146.0], [96.1, 2146.0], [96.2, 2147.0], [96.3, 2148.0], [96.4, 2150.0], [96.5, 2150.0], [96.6, 2151.0], [96.7, 2151.0], [96.8, 2151.0], [96.9, 2152.0], [97.0, 2153.0], [97.1, 2154.0], [97.2, 2155.0], [97.3, 2157.0], [97.4, 2157.0], [97.5, 2157.0], [97.6, 2160.0], [97.7, 2160.0], [97.8, 2162.0], [97.9, 2169.0], [98.0, 2184.0], [98.1, 2186.0], [98.2, 2189.0], [98.3, 2190.0], [98.4, 2190.0], [98.5, 2198.0], [98.6, 2200.0], [98.7, 2203.0], [98.8, 2205.0], [98.9, 2207.0], [99.0, 2233.0], [99.1, 2252.0], [99.2, 2267.0], [99.3, 2280.0], [99.4, 2292.0], [99.5, 2311.0], [99.6, 2318.0], [99.7, 2331.0], [99.8, 2368.0], [99.9, 2370.0], [100.0, 2379.0]], "isOverall": false, "label": "加密插入HTTP请求", "isController": false}], "supportsControllersDiscrimination": true, "maxX": 100.0, "title": "Response Time Percentiles"}},
        getOptions: function() {
            return {
                series: {
                    points: { show: false }
                },
                legend: {
                    noColumns: 2,
                    show: true,
                    container: '#legendResponseTimePercentiles'
                },
                xaxis: {
                    tickDecimals: 1,
                    axisLabel: "Percentiles",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                yaxis: {
                    axisLabel: "Percentile value in ms",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20
                },
                grid: {
                    hoverable: true // IMPORTANT! this is needed for tooltip to
                                    // work
                },
                tooltip: true,
                tooltipOpts: {
                    content: "%s : %x.2 percentile was %y ms"
                },
                selection: { mode: "xy" },
            };
        },
        createGraph: function() {
            var data = this.data;
            var dataset = prepareData(data.result.series, $("#choicesResponseTimePercentiles"));
            var options = this.getOptions();
            prepareOptions(options, data);
            $.plot($("#flotResponseTimesPercentiles"), dataset, options);
            // setup overview
            $.plot($("#overviewResponseTimesPercentiles"), dataset, prepareOverviewOptions(options));
        }
};

/**
 * @param elementId Id of element where we display message
 */
function setEmptyGraph(elementId) {
    $(function() {
        $(elementId).text("No graph series with filter="+seriesFilter);
    });
}

// Response times percentiles
function refreshResponseTimePercentiles() {
    var infos = responseTimePercentilesInfos;
    prepareSeries(infos.data);
    if(infos.data.result.series.length == 0) {
        setEmptyGraph("#bodyResponseTimePercentiles");
        return;
    }
    if (isGraph($("#flotResponseTimesPercentiles"))){
        infos.createGraph();
    } else {
        var choiceContainer = $("#choicesResponseTimePercentiles");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        setGraphZoomable("#flotResponseTimesPercentiles", "#overviewResponseTimesPercentiles");
        $('#bodyResponseTimePercentiles .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
}

var responseTimeDistributionInfos = {
        data: {"result": {"minY": 2.0, "minX": 900.0, "maxY": 240.0, "series": [{"data": [[2100.0, 117.0], [2200.0, 9.0], [2300.0, 6.0], [900.0, 2.0], [1000.0, 23.0], [1100.0, 65.0], [1200.0, 15.0], [1300.0, 46.0], [1400.0, 35.0], [1500.0, 121.0], [1600.0, 100.0], [1700.0, 96.0], [1800.0, 89.0], [1900.0, 36.0], [2000.0, 240.0]], "isOverall": false, "label": "加密插入HTTP请求", "isController": false}], "supportsControllersDiscrimination": true, "granularity": 100, "maxX": 2300.0, "title": "Response Time Distribution"}},
        getOptions: function() {
            var granularity = this.data.result.granularity;
            return {
                legend: {
                    noColumns: 2,
                    show: true,
                    container: '#legendResponseTimeDistribution'
                },
                xaxis:{
                    axisLabel: "Response times in ms",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                yaxis: {
                    axisLabel: "Number of responses",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                bars : {
                    show: true,
                    barWidth: this.data.result.granularity
                },
                grid: {
                    hoverable: true // IMPORTANT! this is needed for tooltip to
                                    // work
                },
                tooltip: true,
                tooltipOpts: {
                    content: function(label, xval, yval, flotItem){
                        return yval + " responses for " + label + " were between " + xval + " and " + (xval + granularity) + " ms";
                    }
                }
            };
        },
        createGraph: function() {
            var data = this.data;
            var options = this.getOptions();
            prepareOptions(options, data);
            $.plot($("#flotResponseTimeDistribution"), prepareData(data.result.series, $("#choicesResponseTimeDistribution")), options);
        }

};

// Response time distribution
function refreshResponseTimeDistribution() {
    var infos = responseTimeDistributionInfos;
    prepareSeries(infos.data);
    if(infos.data.result.series.length == 0) {
        setEmptyGraph("#bodyResponseTimeDistribution");
        return;
    }
    if (isGraph($("#flotResponseTimeDistribution"))){
        infos.createGraph();
    }else{
        var choiceContainer = $("#choicesResponseTimeDistribution");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        $('#footerResponseTimeDistribution .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
};


var syntheticResponseTimeDistributionInfos = {
        data: {"result": {"minY": 186.0, "minX": 1.0, "ticks": [[0, "Requests having \nresponse time <= 500ms"], [1, "Requests having \nresponse time > 500ms and <= 1,500ms"], [2, "Requests having \nresponse time > 1,500ms"], [3, "Requests in error"]], "maxY": 814.0, "series": [{"data": [], "color": "#9ACD32", "isOverall": false, "label": "Requests having \nresponse time <= 500ms", "isController": false}, {"data": [[1.0, 186.0]], "color": "yellow", "isOverall": false, "label": "Requests having \nresponse time > 500ms and <= 1,500ms", "isController": false}, {"data": [[2.0, 814.0]], "color": "orange", "isOverall": false, "label": "Requests having \nresponse time > 1,500ms", "isController": false}, {"data": [], "color": "#FF6347", "isOverall": false, "label": "Requests in error", "isController": false}], "supportsControllersDiscrimination": false, "maxX": 2.0, "title": "Synthetic Response Times Distribution"}},
        getOptions: function() {
            return {
                legend: {
                    noColumns: 2,
                    show: true,
                    container: '#legendSyntheticResponseTimeDistribution'
                },
                xaxis:{
                    axisLabel: "Response times ranges",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                    tickLength:0,
                    min:-0.5,
                    max:3.5
                },
                yaxis: {
                    axisLabel: "Number of responses",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                bars : {
                    show: true,
                    align: "center",
                    barWidth: 0.25,
                    fill:.75
                },
                grid: {
                    hoverable: true // IMPORTANT! this is needed for tooltip to
                                    // work
                },
                tooltip: true,
                tooltipOpts: {
                    content: function(label, xval, yval, flotItem){
                        return yval + " " + label;
                    }
                }
            };
        },
        createGraph: function() {
            var data = this.data;
            var options = this.getOptions();
            prepareOptions(options, data);
            options.xaxis.ticks = data.result.ticks;
            $.plot($("#flotSyntheticResponseTimeDistribution"), prepareData(data.result.series, $("#choicesSyntheticResponseTimeDistribution")), options);
        }

};

// Response time distribution
function refreshSyntheticResponseTimeDistribution() {
    var infos = syntheticResponseTimeDistributionInfos;
    prepareSeries(infos.data, true);
    if (isGraph($("#flotSyntheticResponseTimeDistribution"))){
        infos.createGraph();
    }else{
        var choiceContainer = $("#choicesSyntheticResponseTimeDistribution");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        $('#footerSyntheticResponseTimeDistribution .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
};

var activeThreadsOverTimeInfos = {
        data: {"result": {"minY": 379.41699999999963, "minX": 1.7105892E12, "maxY": 379.41699999999963, "series": [{"data": [[1.7105892E12, 379.41699999999963]], "isOverall": false, "label": "线程组1", "isController": false}], "supportsControllersDiscrimination": false, "granularity": 60000, "maxX": 1.7105892E12, "title": "Active Threads Over Time"}},
        getOptions: function() {
            return {
                series: {
                    stack: true,
                    lines: {
                        show: true,
                        fill: true
                    },
                    points: {
                        show: true
                    }
                },
                xaxis: {
                    mode: "time",
                    timeformat: getTimeFormat(this.data.result.granularity),
                    axisLabel: getElapsedTimeLabel(this.data.result.granularity),
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                yaxis: {
                    axisLabel: "Number of active threads",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20
                },
                legend: {
                    noColumns: 6,
                    show: true,
                    container: '#legendActiveThreadsOverTime'
                },
                grid: {
                    hoverable: true // IMPORTANT! this is needed for tooltip to
                                    // work
                },
                selection: {
                    mode: 'xy'
                },
                tooltip: true,
                tooltipOpts: {
                    content: "%s : At %x there were %y active threads"
                }
            };
        },
        createGraph: function() {
            var data = this.data;
            var dataset = prepareData(data.result.series, $("#choicesActiveThreadsOverTime"));
            var options = this.getOptions();
            prepareOptions(options, data);
            $.plot($("#flotActiveThreadsOverTime"), dataset, options);
            // setup overview
            $.plot($("#overviewActiveThreadsOverTime"), dataset, prepareOverviewOptions(options));
        }
};

// Active Threads Over Time
function refreshActiveThreadsOverTime(fixTimestamps) {
    var infos = activeThreadsOverTimeInfos;
    prepareSeries(infos.data);
    if(fixTimestamps) {
        fixTimeStamps(infos.data.result.series, 28800000);
    }
    if(isGraph($("#flotActiveThreadsOverTime"))) {
        infos.createGraph();
    }else{
        var choiceContainer = $("#choicesActiveThreadsOverTime");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        setGraphZoomable("#flotActiveThreadsOverTime", "#overviewActiveThreadsOverTime");
        $('#footerActiveThreadsOverTime .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
};

var timeVsThreadsInfos = {
        data: {"result": {"minY": 1028.0, "minX": 1980.0, "maxY": 2207.0, "series": [{"data": [[1983.0, 2011.0], [1982.0, 2008.0], [1980.0, 2012.0], [2016.0, 2029.0], [2023.0, 2043.0], [2028.0, 2058.0], [2026.0, 2052.0], [2025.0, 2051.0], [2022.0, 2043.0], [2021.0, 2039.25], [2017.0, 2032.0], [2014.0, 2015.0], [1984.0, 2012.0], [1986.0, 2014.0], [1985.0, 2011.0], [1989.0, 2020.0], [1988.0, 2016.0], [1991.0, 2025.0], [1990.0, 2022.0], [1993.0, 2030.0], [1992.0, 2027.0], [1995.0, 2035.0], [1994.0, 2031.0], [1997.0, 2039.0], [1996.0, 2038.0], [1999.0, 2039.0], [1998.0, 2039.0], [2013.0, 2023.0], [2012.0, 2016.0], [2011.0, 2039.0], [2010.0, 2041.0], [2009.0, 2041.0], [2008.0, 2042.0], [2007.0, 2040.0], [2006.0, 2040.0], [2005.0, 2042.0], [2004.0, 2040.0], [2003.0, 2039.0], [2002.0, 2039.0], [2001.0, 2040.0], [2000.0, 2038.0], [2154.0, 2153.0], [2114.0, 2110.0], [2166.0, 2186.0], [2170.0, 2133.0], [2174.0, 2160.0], [2120.0, 2115.0], [2118.0, 2115.0], [2122.0, 2117.0], [2124.0, 2118.0], [2126.0, 2118.0], [2128.0, 2118.0], [2130.0, 2119.0], [2132.0, 2117.0], [2134.0, 2117.0], [2136.0, 2118.0], [2138.0, 2118.0], [2140.0, 2130.0], [2142.0, 2121.0], [2172.0, 2132.5], [2168.0, 2198.0], [2162.0, 2205.0], [2160.0, 2155.0], [2158.0, 2141.0], [2152.0, 2169.0], [2148.0, 2133.0], [2146.0, 2135.0], [2110.0, 2109.0], [2056.0, 2062.0], [2060.0, 2061.0], [2058.0, 2059.0], [2064.0, 2059.0], [2062.0, 2060.0], [2068.0, 2063.0], [2066.0, 2060.0], [2072.0, 2063.0], [2070.0, 2061.0], [2076.0, 2065.0], [2074.0, 2063.0], [2078.0, 2067.0], [2108.0, 2092.6666666666665], [2104.0, 2099.0], [2102.0, 2082.0], [2100.0, 2087.0], [2098.0, 2082.0], [2096.0, 2079.0], [2094.0, 2068.0], [2092.0, 2069.0], [2090.0, 2072.0], [2088.0, 2067.0], [2086.0, 2068.0], [2084.0, 2065.0], [2082.0, 2063.0], [2080.0, 2065.0], [2240.0, 2095.0], [2286.0, 2061.0], [2252.0, 2084.5], [2296.0, 2025.0], [2300.0, 2054.0], [2246.0, 2088.5], [2244.0, 2088.0], [2248.0, 2088.0], [2250.0, 2098.0], [2254.0, 2060.0], [2256.0, 2064.0], [2260.0, 2077.0], [2258.0, 2075.0], [2266.0, 2059.5], [2264.0, 2075.0], [2268.0, 2059.0], [2270.0, 2058.0], [2302.0, 2051.0], [2298.0, 2049.0], [2294.0, 2044.0], [2290.0, 2043.0], [2284.0, 2038.5], [2282.0, 2056.0], [2280.0, 2065.3333333333335], [2274.0, 2078.0], [2238.0, 2090.0], [2176.0, 2157.0], [2178.0, 2151.0], [2180.0, 2154.0], [2184.0, 2151.0], [2186.0, 2125.0], [2188.0, 2144.0], [2190.0, 2113.0], [2194.0, 2119.0], [2192.0, 2120.0], [2196.0, 2116.0], [2200.0, 2115.0], [2202.0, 2137.0], [2204.0, 2128.0], [2206.0, 2111.0], [2232.0, 2094.0], [2228.0, 2114.0], [2226.0, 2096.0], [2222.0, 2097.0], [2220.0, 2099.0], [2218.0, 2102.0], [2216.0, 2127.0], [2214.0, 2102.0], [2210.0, 2102.0], [2208.0, 2104.0], [2410.0, 1782.0], [2404.0, 1872.0], [2420.0, 1785.0], [2426.0, 1777.6666666666667], [2428.0, 1028.0], [2368.0, 1914.1999999999998], [2370.0, 1887.0], [2394.0, 1870.25], [2372.0, 1882.0], [2396.0, 1865.0], [2398.0, 1873.6666666666667], [2424.0, 1769.0], [2412.0, 1781.5], [2408.0, 1777.3333333333333], [2406.0, 1787.0], [2402.0, 1874.0], [2400.0, 1871.0], [2306.0, 2013.0], [2312.0, 2028.75], [2310.0, 2028.0], [2314.0, 2022.0], [2318.0, 2018.0], [2320.0, 2001.0], [2324.0, 2004.6666666666667], [2326.0, 1998.0], [2328.0, 1994.0], [2332.0, 1996.0], [2330.0, 1987.0], [2334.0, 1997.0], [2352.0, 1971.5], [2350.0, 1982.0], [2348.0, 1968.0], [2346.0, 1971.0], [2344.0, 1993.0], [2342.0, 1971.0], [2340.0, 1978.0], [2338.0, 2001.0], [2336.0, 2005.5], [2454.0, 1370.75], [2440.0, 1201.3333333333333], [2436.0, 1146.0], [2432.0, 1521.0], [2494.0, 1787.4], [2490.0, 1107.0], [2492.0, 1701.6666666666667], [2488.0, 1630.888888888889], [2472.0, 1629.25], [2480.0, 1674.3076923076922], [2482.0, 1570.3333333333333], [2486.0, 1587.0624999999998], [2484.0, 1591.111111111111], [2470.0, 1501.4], [2464.0, 1794.6666666666665], [2466.0, 1595.5], [2468.0, 1468.2], [2442.0, 1143.0], [2452.0, 1142.0], [2450.0, 1135.0], [2448.0, 1137.0], [2446.0, 1150.0], [2444.0, 1143.5], [2456.0, 1322.5], [2460.0, 1127.0], [2502.0, 1093.0], [2500.0, 1096.0], [2498.0, 1443.0], [2496.0, 1600.6666666666665], [2558.0, 1473.0], [2556.0, 1438.5], [2554.0, 1405.0], [2552.0, 1512.8], [2548.0, 1490.0], [2546.0, 1438.0], [2550.0, 1476.6666666666667], [2544.0, 1475.2], [2542.0, 1558.25], [2538.0, 1469.5], [2540.0, 1546.6], [2534.0, 1503.3333333333333], [2536.0, 1550.7142857142858], [2532.0, 1475.0], [2530.0, 1446.5], [2504.0, 1091.0], [2506.0, 1614.4], [2508.0, 1396.5], [2512.0, 1722.0], [2510.0, 1794.0], [2516.0, 1614.3333333333333], [2526.0, 1808.4285714285716], [2524.0, 1584.0], [2522.0, 1811.0], [2514.0, 1794.5], [2462.0, 1499.6], [2570.0, 1788.4285714285713], [2564.0, 1573.6666666666667], [2572.0, 1825.5], [2574.0, 1823.0], [2576.0, 1819.0], [2578.0, 1814.0], [2580.0, 1621.0], [2562.0, 1499.0], [2560.0, 1518.0], [2155.0, 2160.0], [2173.0, 2162.0], [2127.0, 2119.0], [2113.0, 2094.6666666666665], [2115.0, 2119.0], [2121.0, 2103.0], [2123.0, 2118.0], [2125.0, 2117.0], [2129.0, 2118.0], [2131.0, 2125.0], [2133.0, 2118.0], [2135.0, 2118.0], [2137.0, 2121.0], [2139.0, 2119.0], [2143.0, 2134.0], [2169.0, 2184.0], [2167.0, 2130.0], [2165.0, 2189.5], [2163.0, 2207.0], [2161.0, 2146.0], [2159.0, 2146.0], [2157.0, 2147.5], [2153.0, 2148.0], [2151.0, 2140.5], [2149.0, 2136.0], [2147.0, 2127.0], [2145.0, 2136.5], [2077.0, 2065.0], [2075.0, 2064.0], [2073.0, 2064.0], [2071.0, 2061.0], [2069.0, 2059.0], [2067.0, 2062.0], [2065.0, 2058.0], [2063.0, 2058.0], [2061.0, 2059.0], [2059.0, 2062.0], [2057.0, 2064.0], [2051.0, 2061.391304347826], [2079.0, 2066.0], [2105.0, 2098.0], [2103.0, 2088.0], [2101.0, 2098.0], [2099.0, 2082.0], [2097.0, 2082.0], [2095.0, 2082.0], [2093.0, 2068.0], [2091.0, 2070.0], [2089.0, 2070.0], [2087.0, 2068.0], [2085.0, 2066.0], [2083.0, 2066.0], [2081.0, 2066.0], [2285.0, 2044.0], [2303.0, 2033.0], [2243.0, 2088.0], [2241.0, 2088.0], [2247.0, 2086.0], [2249.0, 2087.0], [2253.0, 2050.0], [2255.0, 2064.0], [2257.0, 2075.0], [2263.0, 2067.5], [2261.0, 2076.0], [2269.0, 2083.0], [2271.0, 2058.0], [2301.0, 2036.0], [2299.0, 2023.0], [2297.0, 2048.0], [2295.0, 2042.0], [2293.0, 2040.0], [2291.0, 2030.0], [2289.0, 2037.5], [2287.0, 2043.0], [2281.0, 2023.0], [2277.0, 2057.5], [2275.0, 2059.0], [2177.0, 2122.0], [2179.0, 2112.0], [2183.0, 2139.6666666666665], [2185.0, 2150.0], [2187.0, 2147.0], [2189.0, 2143.0], [2191.0, 2114.0], [2195.0, 2133.0], [2199.0, 2120.3333333333335], [2201.0, 2114.0], [2205.0, 2130.0], [2207.0, 2106.0], [2237.0, 2097.0], [2235.0, 2099.0], [2233.0, 2093.0], [2231.0, 2096.0], [2229.0, 2094.0], [2227.0, 2094.0], [2225.0, 2095.5], [2223.0, 2070.0], [2221.0, 2099.0], [2219.0, 2101.0], [2217.0, 2118.0], [2215.0, 2102.0], [2213.0, 2102.5], [2211.0, 2111.5], [2405.0, 1863.5], [2429.0, 1406.6666666666667], [2431.0, 1754.0], [2371.0, 1875.0], [2395.0, 1872.0], [2399.0, 1873.0], [2425.0, 1779.0], [2421.0, 1775.0], [2417.0, 1786.0], [2415.0, 1779.0], [2403.0, 1870.6666666666667], [2401.0, 1871.3750000000002], [2353.0, 1975.0], [2305.0, 2037.5], [2307.0, 2029.0], [2315.0, 2029.0], [2317.0, 2003.0], [2321.0, 2023.0], [2325.0, 2028.0], [2327.0, 2016.0], [2329.0, 1988.0], [2333.0, 2009.0], [2347.0, 1989.0], [2345.0, 1982.0], [2343.0, 1973.0], [2341.0, 1977.0], [2339.0, 1978.0], [2337.0, 1999.0], [2441.0, 1177.6666666666665], [2463.0, 1881.9166666666665], [2433.0, 1222.25], [2437.0, 1097.8], [2435.0, 1772.0], [2439.0, 1144.0], [2493.0, 1893.6], [2495.0, 2039.7142857142856], [2491.0, 1352.5], [2489.0, 1621.0], [2473.0, 1118.0], [2477.0, 1116.0], [2475.0, 1391.5], [2481.0, 1440.8000000000002], [2479.0, 1707.2], [2483.0, 1492.0], [2485.0, 1536.1666666666667], [2487.0, 1588.9], [2471.0, 1536.909090909091], [2469.0, 1801.875], [2465.0, 1299.4], [2467.0, 1627.3846153846152], [2443.0, 1262.0], [2453.0, 1512.111111111111], [2451.0, 1139.0], [2449.0, 1146.0], [2447.0, 1140.0], [2445.0, 1146.0], [2455.0, 1303.75], [2459.0, 1127.0], [2457.0, 1129.0], [2499.0, 1421.8], [2501.0, 1100.0], [2559.0, 1516.8], [2557.0, 1437.5], [2555.0, 1494.75], [2553.0, 1556.5], [2551.0, 1525.2857142857142], [2549.0, 1475.6666666666667], [2547.0, 1297.0], [2545.0, 1435.0], [2543.0, 1593.6], [2541.0, 1549.2], [2539.0, 1549.1666666666667], [2537.0, 1457.0], [2535.0, 1306.0], [2531.0, 1306.0], [2533.0, 1505.0], [2529.0, 1445.5], [2497.0, 1319.0], [2505.0, 1614.2], [2503.0, 1568.6], [2507.0, 1691.125], [2513.0, 1792.0], [2511.0, 1771.5], [2509.0, 1767.3333333333333], [2515.0, 1841.1666666666665], [2527.0, 1306.0], [2525.0, 1512.0], [2521.0, 1561.0], [2461.0, 1436.2], [2567.0, 1534.2], [2565.0, 1591.0], [2571.0, 1291.0], [2573.0, 1824.0], [2575.0, 1821.0], [2577.0, 1816.0], [2579.0, 1811.0], [2569.0, 1487.0], [2563.0, 1548.1428571428573], [2561.0, 1540.375]], "isOverall": false, "label": "加密插入HTTP请求", "isController": false}, {"data": [[2370.902999999994, 1763.9909999999993]], "isOverall": false, "label": "加密插入HTTP请求-Aggregated", "isController": false}], "supportsControllersDiscrimination": true, "maxX": 2580.0, "title": "Time VS Threads"}},
        getOptions: function() {
            return {
                series: {
                    lines: {
                        show: true
                    },
                    points: {
                        show: true
                    }
                },
                xaxis: {
                    axisLabel: "Number of active threads",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                yaxis: {
                    axisLabel: "Average response times in ms",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20
                },
                legend: { noColumns: 2,show: true, container: '#legendTimeVsThreads' },
                selection: {
                    mode: 'xy'
                },
                grid: {
                    hoverable: true // IMPORTANT! this is needed for tooltip to work
                },
                tooltip: true,
                tooltipOpts: {
                    content: "%s: At %x.2 active threads, Average response time was %y.2 ms"
                }
            };
        },
        createGraph: function() {
            var data = this.data;
            var dataset = prepareData(data.result.series, $("#choicesTimeVsThreads"));
            var options = this.getOptions();
            prepareOptions(options, data);
            $.plot($("#flotTimesVsThreads"), dataset, options);
            // setup overview
            $.plot($("#overviewTimesVsThreads"), dataset, prepareOverviewOptions(options));
        }
};

// Time vs threads
function refreshTimeVsThreads(){
    var infos = timeVsThreadsInfos;
    prepareSeries(infos.data);
    if(infos.data.result.series.length == 0) {
        setEmptyGraph("#bodyTimeVsThreads");
        return;
    }
    if(isGraph($("#flotTimesVsThreads"))){
        infos.createGraph();
    }else{
        var choiceContainer = $("#choicesTimeVsThreads");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        setGraphZoomable("#flotTimesVsThreads", "#overviewTimesVsThreads");
        $('#footerTimeVsThreads .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
};

var bytesThroughputOverTimeInfos = {
        data : {"result": {"minY": 5766.666666666667, "minX": 1.7105892E12, "maxY": 5997.0, "series": [{"data": [[1.7105892E12, 5997.0]], "isOverall": false, "label": "Bytes received per second", "isController": false}, {"data": [[1.7105892E12, 5766.666666666667]], "isOverall": false, "label": "Bytes sent per second", "isController": false}], "supportsControllersDiscrimination": false, "granularity": 60000, "maxX": 1.7105892E12, "title": "Bytes Throughput Over Time"}},
        getOptions : function(){
            return {
                series: {
                    lines: {
                        show: true
                    },
                    points: {
                        show: true
                    }
                },
                xaxis: {
                    mode: "time",
                    timeformat: getTimeFormat(this.data.result.granularity),
                    axisLabel: getElapsedTimeLabel(this.data.result.granularity) ,
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                yaxis: {
                    axisLabel: "Bytes / sec",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                legend: {
                    noColumns: 2,
                    show: true,
                    container: '#legendBytesThroughputOverTime'
                },
                selection: {
                    mode: "xy"
                },
                grid: {
                    hoverable: true // IMPORTANT! this is needed for tooltip to
                                    // work
                },
                tooltip: true,
                tooltipOpts: {
                    content: "%s at %x was %y"
                }
            };
        },
        createGraph : function() {
            var data = this.data;
            var dataset = prepareData(data.result.series, $("#choicesBytesThroughputOverTime"));
            var options = this.getOptions();
            prepareOptions(options, data);
            $.plot($("#flotBytesThroughputOverTime"), dataset, options);
            // setup overview
            $.plot($("#overviewBytesThroughputOverTime"), dataset, prepareOverviewOptions(options));
        }
};

// Bytes throughput Over Time
function refreshBytesThroughputOverTime(fixTimestamps) {
    var infos = bytesThroughputOverTimeInfos;
    prepareSeries(infos.data);
    if(fixTimestamps) {
        fixTimeStamps(infos.data.result.series, 28800000);
    }
    if(isGraph($("#flotBytesThroughputOverTime"))){
        infos.createGraph();
    }else{
        var choiceContainer = $("#choicesBytesThroughputOverTime");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        setGraphZoomable("#flotBytesThroughputOverTime", "#overviewBytesThroughputOverTime");
        $('#footerBytesThroughputOverTime .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
}

var responseTimesOverTimeInfos = {
        data: {"result": {"minY": 1763.9909999999993, "minX": 1.7105892E12, "maxY": 1763.9909999999993, "series": [{"data": [[1.7105892E12, 1763.9909999999993]], "isOverall": false, "label": "加密插入HTTP请求", "isController": false}], "supportsControllersDiscrimination": true, "granularity": 60000, "maxX": 1.7105892E12, "title": "Response Time Over Time"}},
        getOptions: function(){
            return {
                series: {
                    lines: {
                        show: true
                    },
                    points: {
                        show: true
                    }
                },
                xaxis: {
                    mode: "time",
                    timeformat: getTimeFormat(this.data.result.granularity),
                    axisLabel: getElapsedTimeLabel(this.data.result.granularity),
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                yaxis: {
                    axisLabel: "Average response time in ms",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                legend: {
                    noColumns: 2,
                    show: true,
                    container: '#legendResponseTimesOverTime'
                },
                selection: {
                    mode: 'xy'
                },
                grid: {
                    hoverable: true // IMPORTANT! this is needed for tooltip to
                                    // work
                },
                tooltip: true,
                tooltipOpts: {
                    content: "%s : at %x Average response time was %y ms"
                }
            };
        },
        createGraph: function() {
            var data = this.data;
            var dataset = prepareData(data.result.series, $("#choicesResponseTimesOverTime"));
            var options = this.getOptions();
            prepareOptions(options, data);
            $.plot($("#flotResponseTimesOverTime"), dataset, options);
            // setup overview
            $.plot($("#overviewResponseTimesOverTime"), dataset, prepareOverviewOptions(options));
        }
};

// Response Times Over Time
function refreshResponseTimeOverTime(fixTimestamps) {
    var infos = responseTimesOverTimeInfos;
    prepareSeries(infos.data);
    if(infos.data.result.series.length == 0) {
        setEmptyGraph("#bodyResponseTimeOverTime");
        return;
    }
    if(fixTimestamps) {
        fixTimeStamps(infos.data.result.series, 28800000);
    }
    if(isGraph($("#flotResponseTimesOverTime"))){
        infos.createGraph();
    }else{
        var choiceContainer = $("#choicesResponseTimesOverTime");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        setGraphZoomable("#flotResponseTimesOverTime", "#overviewResponseTimesOverTime");
        $('#footerResponseTimesOverTime .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
};

var latenciesOverTimeInfos = {
        data: {"result": {"minY": 1745.2870000000003, "minX": 1.7105892E12, "maxY": 1745.2870000000003, "series": [{"data": [[1.7105892E12, 1745.2870000000003]], "isOverall": false, "label": "加密插入HTTP请求", "isController": false}], "supportsControllersDiscrimination": true, "granularity": 60000, "maxX": 1.7105892E12, "title": "Latencies Over Time"}},
        getOptions: function() {
            return {
                series: {
                    lines: {
                        show: true
                    },
                    points: {
                        show: true
                    }
                },
                xaxis: {
                    mode: "time",
                    timeformat: getTimeFormat(this.data.result.granularity),
                    axisLabel: getElapsedTimeLabel(this.data.result.granularity),
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                yaxis: {
                    axisLabel: "Average response latencies in ms",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                legend: {
                    noColumns: 2,
                    show: true,
                    container: '#legendLatenciesOverTime'
                },
                selection: {
                    mode: 'xy'
                },
                grid: {
                    hoverable: true // IMPORTANT! this is needed for tooltip to
                                    // work
                },
                tooltip: true,
                tooltipOpts: {
                    content: "%s : at %x Average latency was %y ms"
                }
            };
        },
        createGraph: function () {
            var data = this.data;
            var dataset = prepareData(data.result.series, $("#choicesLatenciesOverTime"));
            var options = this.getOptions();
            prepareOptions(options, data);
            $.plot($("#flotLatenciesOverTime"), dataset, options);
            // setup overview
            $.plot($("#overviewLatenciesOverTime"), dataset, prepareOverviewOptions(options));
        }
};

// Latencies Over Time
function refreshLatenciesOverTime(fixTimestamps) {
    var infos = latenciesOverTimeInfos;
    prepareSeries(infos.data);
    if(infos.data.result.series.length == 0) {
        setEmptyGraph("#bodyLatenciesOverTime");
        return;
    }
    if(fixTimestamps) {
        fixTimeStamps(infos.data.result.series, 28800000);
    }
    if(isGraph($("#flotLatenciesOverTime"))) {
        infos.createGraph();
    }else {
        var choiceContainer = $("#choicesLatenciesOverTime");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        setGraphZoomable("#flotLatenciesOverTime", "#overviewLatenciesOverTime");
        $('#footerLatenciesOverTime .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
};

var connectTimeOverTimeInfos = {
        data: {"result": {"minY": 10.310000000000011, "minX": 1.7105892E12, "maxY": 10.310000000000011, "series": [{"data": [[1.7105892E12, 10.310000000000011]], "isOverall": false, "label": "加密插入HTTP请求", "isController": false}], "supportsControllersDiscrimination": true, "granularity": 60000, "maxX": 1.7105892E12, "title": "Connect Time Over Time"}},
        getOptions: function() {
            return {
                series: {
                    lines: {
                        show: true
                    },
                    points: {
                        show: true
                    }
                },
                xaxis: {
                    mode: "time",
                    timeformat: getTimeFormat(this.data.result.granularity),
                    axisLabel: getConnectTimeLabel(this.data.result.granularity),
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                yaxis: {
                    axisLabel: "Average Connect Time in ms",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                legend: {
                    noColumns: 2,
                    show: true,
                    container: '#legendConnectTimeOverTime'
                },
                selection: {
                    mode: 'xy'
                },
                grid: {
                    hoverable: true // IMPORTANT! this is needed for tooltip to
                                    // work
                },
                tooltip: true,
                tooltipOpts: {
                    content: "%s : at %x Average connect time was %y ms"
                }
            };
        },
        createGraph: function () {
            var data = this.data;
            var dataset = prepareData(data.result.series, $("#choicesConnectTimeOverTime"));
            var options = this.getOptions();
            prepareOptions(options, data);
            $.plot($("#flotConnectTimeOverTime"), dataset, options);
            // setup overview
            $.plot($("#overviewConnectTimeOverTime"), dataset, prepareOverviewOptions(options));
        }
};

// Connect Time Over Time
function refreshConnectTimeOverTime(fixTimestamps) {
    var infos = connectTimeOverTimeInfos;
    prepareSeries(infos.data);
    if(infos.data.result.series.length == 0) {
        setEmptyGraph("#bodyConnectTimeOverTime");
        return;
    }
    if(fixTimestamps) {
        fixTimeStamps(infos.data.result.series, 28800000);
    }
    if(isGraph($("#flotConnectTimeOverTime"))) {
        infos.createGraph();
    }else {
        var choiceContainer = $("#choicesConnectTimeOverTime");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        setGraphZoomable("#flotConnectTimeOverTime", "#overviewConnectTimeOverTime");
        $('#footerConnectTimeOverTime .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
};

var responseTimePercentilesOverTimeInfos = {
        data: {"result": {"minY": 986.0, "minX": 1.7105892E12, "maxY": 2379.0, "series": [{"data": [[1.7105892E12, 2379.0]], "isOverall": false, "label": "Max", "isController": false}, {"data": [[1.7105892E12, 2116.9]], "isOverall": false, "label": "90th percentile", "isController": false}, {"data": [[1.7105892E12, 2251.8100000000004]], "isOverall": false, "label": "99th percentile", "isController": false}, {"data": [[1.7105892E12, 2136.95]], "isOverall": false, "label": "95th percentile", "isController": false}, {"data": [[1.7105892E12, 986.0]], "isOverall": false, "label": "Min", "isController": false}, {"data": [[1.7105892E12, 1796.0]], "isOverall": false, "label": "Median", "isController": false}], "supportsControllersDiscrimination": false, "granularity": 60000, "maxX": 1.7105892E12, "title": "Response Time Percentiles Over Time (successful requests only)"}},
        getOptions: function() {
            return {
                series: {
                    lines: {
                        show: true,
                        fill: true
                    },
                    points: {
                        show: true
                    }
                },
                xaxis: {
                    mode: "time",
                    timeformat: getTimeFormat(this.data.result.granularity),
                    axisLabel: getElapsedTimeLabel(this.data.result.granularity),
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                yaxis: {
                    axisLabel: "Response Time in ms",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                legend: {
                    noColumns: 2,
                    show: true,
                    container: '#legendResponseTimePercentilesOverTime'
                },
                selection: {
                    mode: 'xy'
                },
                grid: {
                    hoverable: true // IMPORTANT! this is needed for tooltip to
                                    // work
                },
                tooltip: true,
                tooltipOpts: {
                    content: "%s : at %x Response time was %y ms"
                }
            };
        },
        createGraph: function () {
            var data = this.data;
            var dataset = prepareData(data.result.series, $("#choicesResponseTimePercentilesOverTime"));
            var options = this.getOptions();
            prepareOptions(options, data);
            $.plot($("#flotResponseTimePercentilesOverTime"), dataset, options);
            // setup overview
            $.plot($("#overviewResponseTimePercentilesOverTime"), dataset, prepareOverviewOptions(options));
        }
};

// Response Time Percentiles Over Time
function refreshResponseTimePercentilesOverTime(fixTimestamps) {
    var infos = responseTimePercentilesOverTimeInfos;
    prepareSeries(infos.data);
    if(fixTimestamps) {
        fixTimeStamps(infos.data.result.series, 28800000);
    }
    if(isGraph($("#flotResponseTimePercentilesOverTime"))) {
        infos.createGraph();
    }else {
        var choiceContainer = $("#choicesResponseTimePercentilesOverTime");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        setGraphZoomable("#flotResponseTimePercentilesOverTime", "#overviewResponseTimePercentilesOverTime");
        $('#footerResponseTimePercentilesOverTime .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
};


var responseTimeVsRequestInfos = {
    data: {"result": {"minY": 1137.0, "minX": 1.0, "maxY": 2060.0, "series": [{"data": [[1.0, 2012.0], [343.0, 1631.0], [94.0, 1461.5], [113.0, 1137.0], [449.0, 2060.0]], "isOverall": false, "label": "Successes", "isController": false}], "supportsControllersDiscrimination": false, "granularity": 1000, "maxX": 449.0, "title": "Response Time Vs Request"}},
    getOptions: function() {
        return {
            series: {
                lines: {
                    show: false
                },
                points: {
                    show: true
                }
            },
            xaxis: {
                axisLabel: "Global number of requests per second",
                axisLabelUseCanvas: true,
                axisLabelFontSizePixels: 12,
                axisLabelFontFamily: 'Verdana, Arial',
                axisLabelPadding: 20,
            },
            yaxis: {
                axisLabel: "Median Response Time in ms",
                axisLabelUseCanvas: true,
                axisLabelFontSizePixels: 12,
                axisLabelFontFamily: 'Verdana, Arial',
                axisLabelPadding: 20,
            },
            legend: {
                noColumns: 2,
                show: true,
                container: '#legendResponseTimeVsRequest'
            },
            selection: {
                mode: 'xy'
            },
            grid: {
                hoverable: true // IMPORTANT! this is needed for tooltip to work
            },
            tooltip: true,
            tooltipOpts: {
                content: "%s : Median response time at %x req/s was %y ms"
            },
            colors: ["#9ACD32", "#FF6347"]
        };
    },
    createGraph: function () {
        var data = this.data;
        var dataset = prepareData(data.result.series, $("#choicesResponseTimeVsRequest"));
        var options = this.getOptions();
        prepareOptions(options, data);
        $.plot($("#flotResponseTimeVsRequest"), dataset, options);
        // setup overview
        $.plot($("#overviewResponseTimeVsRequest"), dataset, prepareOverviewOptions(options));

    }
};

// Response Time vs Request
function refreshResponseTimeVsRequest() {
    var infos = responseTimeVsRequestInfos;
    prepareSeries(infos.data);
    if (isGraph($("#flotResponseTimeVsRequest"))){
        infos.createGraph();
    }else{
        var choiceContainer = $("#choicesResponseTimeVsRequest");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        setGraphZoomable("#flotResponseTimeVsRequest", "#overviewResponseTimeVsRequest");
        $('#footerResponseRimeVsRequest .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
};


var latenciesVsRequestInfos = {
    data: {"result": {"minY": 1134.0, "minX": 1.0, "maxY": 2058.0, "series": [{"data": [[1.0, 2012.0], [343.0, 1627.0], [94.0, 1404.0], [113.0, 1134.0], [449.0, 2058.0]], "isOverall": false, "label": "Successes", "isController": false}], "supportsControllersDiscrimination": false, "granularity": 1000, "maxX": 449.0, "title": "Latencies Vs Request"}},
    getOptions: function() {
        return{
            series: {
                lines: {
                    show: false
                },
                points: {
                    show: true
                }
            },
            xaxis: {
                axisLabel: "Global number of requests per second",
                axisLabelUseCanvas: true,
                axisLabelFontSizePixels: 12,
                axisLabelFontFamily: 'Verdana, Arial',
                axisLabelPadding: 20,
            },
            yaxis: {
                axisLabel: "Median Latency in ms",
                axisLabelUseCanvas: true,
                axisLabelFontSizePixels: 12,
                axisLabelFontFamily: 'Verdana, Arial',
                axisLabelPadding: 20,
            },
            legend: { noColumns: 2,show: true, container: '#legendLatencyVsRequest' },
            selection: {
                mode: 'xy'
            },
            grid: {
                hoverable: true // IMPORTANT! this is needed for tooltip to work
            },
            tooltip: true,
            tooltipOpts: {
                content: "%s : Median Latency time at %x req/s was %y ms"
            },
            colors: ["#9ACD32", "#FF6347"]
        };
    },
    createGraph: function () {
        var data = this.data;
        var dataset = prepareData(data.result.series, $("#choicesLatencyVsRequest"));
        var options = this.getOptions();
        prepareOptions(options, data);
        $.plot($("#flotLatenciesVsRequest"), dataset, options);
        // setup overview
        $.plot($("#overviewLatenciesVsRequest"), dataset, prepareOverviewOptions(options));
    }
};

// Latencies vs Request
function refreshLatenciesVsRequest() {
        var infos = latenciesVsRequestInfos;
        prepareSeries(infos.data);
        if(isGraph($("#flotLatenciesVsRequest"))){
            infos.createGraph();
        }else{
            var choiceContainer = $("#choicesLatencyVsRequest");
            createLegend(choiceContainer, infos);
            infos.createGraph();
            setGraphZoomable("#flotLatenciesVsRequest", "#overviewLatenciesVsRequest");
            $('#footerLatenciesVsRequest .legendColorBox > div').each(function(i){
                $(this).clone().prependTo(choiceContainer.find("li").eq(i));
            });
        }
};

var hitsPerSecondInfos = {
        data: {"result": {"minY": 16.666666666666668, "minX": 1.7105892E12, "maxY": 16.666666666666668, "series": [{"data": [[1.7105892E12, 16.666666666666668]], "isOverall": false, "label": "hitsPerSecond", "isController": false}], "supportsControllersDiscrimination": false, "granularity": 60000, "maxX": 1.7105892E12, "title": "Hits Per Second"}},
        getOptions: function() {
            return {
                series: {
                    lines: {
                        show: true
                    },
                    points: {
                        show: true
                    }
                },
                xaxis: {
                    mode: "time",
                    timeformat: getTimeFormat(this.data.result.granularity),
                    axisLabel: getElapsedTimeLabel(this.data.result.granularity),
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                yaxis: {
                    axisLabel: "Number of hits / sec",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20
                },
                legend: {
                    noColumns: 2,
                    show: true,
                    container: "#legendHitsPerSecond"
                },
                selection: {
                    mode : 'xy'
                },
                grid: {
                    hoverable: true // IMPORTANT! this is needed for tooltip to
                                    // work
                },
                tooltip: true,
                tooltipOpts: {
                    content: "%s at %x was %y.2 hits/sec"
                }
            };
        },
        createGraph: function createGraph() {
            var data = this.data;
            var dataset = prepareData(data.result.series, $("#choicesHitsPerSecond"));
            var options = this.getOptions();
            prepareOptions(options, data);
            $.plot($("#flotHitsPerSecond"), dataset, options);
            // setup overview
            $.plot($("#overviewHitsPerSecond"), dataset, prepareOverviewOptions(options));
        }
};

// Hits per second
function refreshHitsPerSecond(fixTimestamps) {
    var infos = hitsPerSecondInfos;
    prepareSeries(infos.data);
    if(fixTimestamps) {
        fixTimeStamps(infos.data.result.series, 28800000);
    }
    if (isGraph($("#flotHitsPerSecond"))){
        infos.createGraph();
    }else{
        var choiceContainer = $("#choicesHitsPerSecond");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        setGraphZoomable("#flotHitsPerSecond", "#overviewHitsPerSecond");
        $('#footerHitsPerSecond .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
}

var codesPerSecondInfos = {
        data: {"result": {"minY": 16.666666666666668, "minX": 1.7105892E12, "maxY": 16.666666666666668, "series": [{"data": [[1.7105892E12, 16.666666666666668]], "isOverall": false, "label": "200", "isController": false}], "supportsControllersDiscrimination": false, "granularity": 60000, "maxX": 1.7105892E12, "title": "Codes Per Second"}},
        getOptions: function(){
            return {
                series: {
                    lines: {
                        show: true
                    },
                    points: {
                        show: true
                    }
                },
                xaxis: {
                    mode: "time",
                    timeformat: getTimeFormat(this.data.result.granularity),
                    axisLabel: getElapsedTimeLabel(this.data.result.granularity),
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                yaxis: {
                    axisLabel: "Number of responses / sec",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                legend: {
                    noColumns: 2,
                    show: true,
                    container: "#legendCodesPerSecond"
                },
                selection: {
                    mode: 'xy'
                },
                grid: {
                    hoverable: true // IMPORTANT! this is needed for tooltip to
                                    // work
                },
                tooltip: true,
                tooltipOpts: {
                    content: "Number of Response Codes %s at %x was %y.2 responses / sec"
                }
            };
        },
    createGraph: function() {
        var data = this.data;
        var dataset = prepareData(data.result.series, $("#choicesCodesPerSecond"));
        var options = this.getOptions();
        prepareOptions(options, data);
        $.plot($("#flotCodesPerSecond"), dataset, options);
        // setup overview
        $.plot($("#overviewCodesPerSecond"), dataset, prepareOverviewOptions(options));
    }
};

// Codes per second
function refreshCodesPerSecond(fixTimestamps) {
    var infos = codesPerSecondInfos;
    prepareSeries(infos.data);
    if(fixTimestamps) {
        fixTimeStamps(infos.data.result.series, 28800000);
    }
    if(isGraph($("#flotCodesPerSecond"))){
        infos.createGraph();
    }else{
        var choiceContainer = $("#choicesCodesPerSecond");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        setGraphZoomable("#flotCodesPerSecond", "#overviewCodesPerSecond");
        $('#footerCodesPerSecond .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
};

var transactionsPerSecondInfos = {
        data: {"result": {"minY": 16.666666666666668, "minX": 1.7105892E12, "maxY": 16.666666666666668, "series": [{"data": [[1.7105892E12, 16.666666666666668]], "isOverall": false, "label": "加密插入HTTP请求-success", "isController": false}], "supportsControllersDiscrimination": true, "granularity": 60000, "maxX": 1.7105892E12, "title": "Transactions Per Second"}},
        getOptions: function(){
            return {
                series: {
                    lines: {
                        show: true
                    },
                    points: {
                        show: true
                    }
                },
                xaxis: {
                    mode: "time",
                    timeformat: getTimeFormat(this.data.result.granularity),
                    axisLabel: getElapsedTimeLabel(this.data.result.granularity),
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                yaxis: {
                    axisLabel: "Number of transactions / sec",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20
                },
                legend: {
                    noColumns: 2,
                    show: true,
                    container: "#legendTransactionsPerSecond"
                },
                selection: {
                    mode: 'xy'
                },
                grid: {
                    hoverable: true // IMPORTANT! this is needed for tooltip to
                                    // work
                },
                tooltip: true,
                tooltipOpts: {
                    content: "%s at %x was %y transactions / sec"
                }
            };
        },
    createGraph: function () {
        var data = this.data;
        var dataset = prepareData(data.result.series, $("#choicesTransactionsPerSecond"));
        var options = this.getOptions();
        prepareOptions(options, data);
        $.plot($("#flotTransactionsPerSecond"), dataset, options);
        // setup overview
        $.plot($("#overviewTransactionsPerSecond"), dataset, prepareOverviewOptions(options));
    }
};

// Transactions per second
function refreshTransactionsPerSecond(fixTimestamps) {
    var infos = transactionsPerSecondInfos;
    prepareSeries(infos.data);
    if(infos.data.result.series.length == 0) {
        setEmptyGraph("#bodyTransactionsPerSecond");
        return;
    }
    if(fixTimestamps) {
        fixTimeStamps(infos.data.result.series, 28800000);
    }
    if(isGraph($("#flotTransactionsPerSecond"))){
        infos.createGraph();
    }else{
        var choiceContainer = $("#choicesTransactionsPerSecond");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        setGraphZoomable("#flotTransactionsPerSecond", "#overviewTransactionsPerSecond");
        $('#footerTransactionsPerSecond .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
};

var totalTPSInfos = {
        data: {"result": {"minY": 16.666666666666668, "minX": 1.7105892E12, "maxY": 16.666666666666668, "series": [{"data": [[1.7105892E12, 16.666666666666668]], "isOverall": false, "label": "Transaction-success", "isController": false}, {"data": [], "isOverall": false, "label": "Transaction-failure", "isController": false}], "supportsControllersDiscrimination": true, "granularity": 60000, "maxX": 1.7105892E12, "title": "Total Transactions Per Second"}},
        getOptions: function(){
            return {
                series: {
                    lines: {
                        show: true
                    },
                    points: {
                        show: true
                    }
                },
                xaxis: {
                    mode: "time",
                    timeformat: getTimeFormat(this.data.result.granularity),
                    axisLabel: getElapsedTimeLabel(this.data.result.granularity),
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                yaxis: {
                    axisLabel: "Number of transactions / sec",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20
                },
                legend: {
                    noColumns: 2,
                    show: true,
                    container: "#legendTotalTPS"
                },
                selection: {
                    mode: 'xy'
                },
                grid: {
                    hoverable: true // IMPORTANT! this is needed for tooltip to
                                    // work
                },
                tooltip: true,
                tooltipOpts: {
                    content: "%s at %x was %y transactions / sec"
                },
                colors: ["#9ACD32", "#FF6347"]
            };
        },
    createGraph: function () {
        var data = this.data;
        var dataset = prepareData(data.result.series, $("#choicesTotalTPS"));
        var options = this.getOptions();
        prepareOptions(options, data);
        $.plot($("#flotTotalTPS"), dataset, options);
        // setup overview
        $.plot($("#overviewTotalTPS"), dataset, prepareOverviewOptions(options));
    }
};

// Total Transactions per second
function refreshTotalTPS(fixTimestamps) {
    var infos = totalTPSInfos;
    // We want to ignore seriesFilter
    prepareSeries(infos.data, false, true);
    if(fixTimestamps) {
        fixTimeStamps(infos.data.result.series, 28800000);
    }
    if(isGraph($("#flotTotalTPS"))){
        infos.createGraph();
    }else{
        var choiceContainer = $("#choicesTotalTPS");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        setGraphZoomable("#flotTotalTPS", "#overviewTotalTPS");
        $('#footerTotalTPS .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
};

// Collapse the graph matching the specified DOM element depending the collapsed
// status
function collapse(elem, collapsed){
    if(collapsed){
        $(elem).parent().find(".fa-chevron-up").removeClass("fa-chevron-up").addClass("fa-chevron-down");
    } else {
        $(elem).parent().find(".fa-chevron-down").removeClass("fa-chevron-down").addClass("fa-chevron-up");
        if (elem.id == "bodyBytesThroughputOverTime") {
            if (isGraph($(elem).find('.flot-chart-content')) == false) {
                refreshBytesThroughputOverTime(true);
            }
            document.location.href="#bytesThroughputOverTime";
        } else if (elem.id == "bodyLatenciesOverTime") {
            if (isGraph($(elem).find('.flot-chart-content')) == false) {
                refreshLatenciesOverTime(true);
            }
            document.location.href="#latenciesOverTime";
        } else if (elem.id == "bodyCustomGraph") {
            if (isGraph($(elem).find('.flot-chart-content')) == false) {
                refreshCustomGraph(true);
            }
            document.location.href="#responseCustomGraph";
        } else if (elem.id == "bodyConnectTimeOverTime") {
            if (isGraph($(elem).find('.flot-chart-content')) == false) {
                refreshConnectTimeOverTime(true);
            }
            document.location.href="#connectTimeOverTime";
        } else if (elem.id == "bodyResponseTimePercentilesOverTime") {
            if (isGraph($(elem).find('.flot-chart-content')) == false) {
                refreshResponseTimePercentilesOverTime(true);
            }
            document.location.href="#responseTimePercentilesOverTime";
        } else if (elem.id == "bodyResponseTimeDistribution") {
            if (isGraph($(elem).find('.flot-chart-content')) == false) {
                refreshResponseTimeDistribution();
            }
            document.location.href="#responseTimeDistribution" ;
        } else if (elem.id == "bodySyntheticResponseTimeDistribution") {
            if (isGraph($(elem).find('.flot-chart-content')) == false) {
                refreshSyntheticResponseTimeDistribution();
            }
            document.location.href="#syntheticResponseTimeDistribution" ;
        } else if (elem.id == "bodyActiveThreadsOverTime") {
            if (isGraph($(elem).find('.flot-chart-content')) == false) {
                refreshActiveThreadsOverTime(true);
            }
            document.location.href="#activeThreadsOverTime";
        } else if (elem.id == "bodyTimeVsThreads") {
            if (isGraph($(elem).find('.flot-chart-content')) == false) {
                refreshTimeVsThreads();
            }
            document.location.href="#timeVsThreads" ;
        } else if (elem.id == "bodyCodesPerSecond") {
            if (isGraph($(elem).find('.flot-chart-content')) == false) {
                refreshCodesPerSecond(true);
            }
            document.location.href="#codesPerSecond";
        } else if (elem.id == "bodyTransactionsPerSecond") {
            if (isGraph($(elem).find('.flot-chart-content')) == false) {
                refreshTransactionsPerSecond(true);
            }
            document.location.href="#transactionsPerSecond";
        } else if (elem.id == "bodyTotalTPS") {
            if (isGraph($(elem).find('.flot-chart-content')) == false) {
                refreshTotalTPS(true);
            }
            document.location.href="#totalTPS";
        } else if (elem.id == "bodyResponseTimeVsRequest") {
            if (isGraph($(elem).find('.flot-chart-content')) == false) {
                refreshResponseTimeVsRequest();
            }
            document.location.href="#responseTimeVsRequest";
        } else if (elem.id == "bodyLatenciesVsRequest") {
            if (isGraph($(elem).find('.flot-chart-content')) == false) {
                refreshLatenciesVsRequest();
            }
            document.location.href="#latencyVsRequest";
        }
    }
}

/*
 * Activates or deactivates all series of the specified graph (represented by id parameter)
 * depending on checked argument.
 */
function toggleAll(id, checked){
    var placeholder = document.getElementById(id);

    var cases = $(placeholder).find(':checkbox');
    cases.prop('checked', checked);
    $(cases).parent().children().children().toggleClass("legend-disabled", !checked);

    var choiceContainer;
    if ( id == "choicesBytesThroughputOverTime"){
        choiceContainer = $("#choicesBytesThroughputOverTime");
        refreshBytesThroughputOverTime(false);
    } else if(id == "choicesResponseTimesOverTime"){
        choiceContainer = $("#choicesResponseTimesOverTime");
        refreshResponseTimeOverTime(false);
    }else if(id == "choicesResponseCustomGraph"){
        choiceContainer = $("#choicesResponseCustomGraph");
        refreshCustomGraph(false);
    } else if ( id == "choicesLatenciesOverTime"){
        choiceContainer = $("#choicesLatenciesOverTime");
        refreshLatenciesOverTime(false);
    } else if ( id == "choicesConnectTimeOverTime"){
        choiceContainer = $("#choicesConnectTimeOverTime");
        refreshConnectTimeOverTime(false);
    } else if ( id == "choicesResponseTimePercentilesOverTime"){
        choiceContainer = $("#choicesResponseTimePercentilesOverTime");
        refreshResponseTimePercentilesOverTime(false);
    } else if ( id == "choicesResponseTimePercentiles"){
        choiceContainer = $("#choicesResponseTimePercentiles");
        refreshResponseTimePercentiles();
    } else if(id == "choicesActiveThreadsOverTime"){
        choiceContainer = $("#choicesActiveThreadsOverTime");
        refreshActiveThreadsOverTime(false);
    } else if ( id == "choicesTimeVsThreads"){
        choiceContainer = $("#choicesTimeVsThreads");
        refreshTimeVsThreads();
    } else if ( id == "choicesSyntheticResponseTimeDistribution"){
        choiceContainer = $("#choicesSyntheticResponseTimeDistribution");
        refreshSyntheticResponseTimeDistribution();
    } else if ( id == "choicesResponseTimeDistribution"){
        choiceContainer = $("#choicesResponseTimeDistribution");
        refreshResponseTimeDistribution();
    } else if ( id == "choicesHitsPerSecond"){
        choiceContainer = $("#choicesHitsPerSecond");
        refreshHitsPerSecond(false);
    } else if(id == "choicesCodesPerSecond"){
        choiceContainer = $("#choicesCodesPerSecond");
        refreshCodesPerSecond(false);
    } else if ( id == "choicesTransactionsPerSecond"){
        choiceContainer = $("#choicesTransactionsPerSecond");
        refreshTransactionsPerSecond(false);
    } else if ( id == "choicesTotalTPS"){
        choiceContainer = $("#choicesTotalTPS");
        refreshTotalTPS(false);
    } else if ( id == "choicesResponseTimeVsRequest"){
        choiceContainer = $("#choicesResponseTimeVsRequest");
        refreshResponseTimeVsRequest();
    } else if ( id == "choicesLatencyVsRequest"){
        choiceContainer = $("#choicesLatencyVsRequest");
        refreshLatenciesVsRequest();
    }
    var color = checked ? "black" : "#818181";
    if(choiceContainer != null) {
        choiceContainer.find("label").each(function(){
            this.style.color = color;
        });
    }
}

